<extend name="common:base" />
<block name="content">
    <div id="header">
        <div class="header">
            <h1 class="tit">{$site_title}</h1>
            <!--<p class="goback">-->
                <!--<a class="return" href="{:U('Agent/agent_upgrade')}">返回</a>-->
            <!--</p>-->
            <!--<p class="more"><a class="share" href=""></a></p>-->
        </div>
    </div>
    <div class="banx-a">
        <form action="{:U('Agent/up_audit')}" method="post" id="mem_save">
            <div class="ones">
                <div class="a-a1">
                    <p class="form-p">
                        <span class="fleft form-title">姓名：</span>
                        <input type="text" value="{:GetAgentNameById($up_audit['agent_id'])}" class="form-text" readonly/>
                    </p>
                    <p class="form-p">
                        <span class="fleft form-title">原级别：</span>
                        <input type="text" value="{:GetRankNameById($up_audit['old_rank'])}" class="form-text" readonly/>
                    </p>
                    <p class="form-p">
                        <span class="fleft form-title">申请级别：</span>
                        <input type="text" value="{:GetRankNameById($up_audit['rank_id'])}" class="form-text" readonly/>
                    </p>
                    <p class="form-p">
                        <span class="fleft form-title">申请时间：</span>
                        <span >{$up_audit['up_time']|date="Y-m-d H:i:s",###}</span>
                    </p>
                    <textarea class="remark" placeholder="升级备注（50字以内）" name="remark" style="height:1rem;" readonly>升级备注：{$up_audit['remark']}</textarea>
                    <p class="form-p">
                        <span class="fleft form-title">是否通过：</span>
                        <notempty name="up_audit['is_me']">
                            <span>审核中</span>
                            <else/>
                            <empty name="up_audit['is_adopt']">
                                <select class="form-select" name="status">
                                    <option value="1">通过</option>
                                    <option value="2">不通过</option>
                                </select>
                                <else/>
                                <if condition="$up_audit['is_adopt'] eq 1">
                                    <span>通过</span>
                                    <elseif condition="$up_audit['is_adopt'] eq 2"/>
                                    <span>未通过</span>
                                </if>
                            </empty>
                        </notempty>
                    </p>
                    <input type="hidden" name="up_id" value="{$up_audit['up_id']}"/>
                    <empty name="up_audit['is_me']">
                    <empty name="up_audit['is_adopt']">
                    <textarea class="remark" placeholder="审核备注（50字以内）" name="remark" id="remark" style="height:1.5rem;"></textarea>
                    <else/>
                    <textarea class="remark"  name="remark"  style="height:1.5rem;" readonly>审核备注：{$up_audit['audit_remark']}</textarea>
                    </empty>
                    </empty>
                </div>
            </div>
            <empty name="up_audit['is_me']">
            <empty name="up_audit['is_adopt']">
            <span class="sub" id="sub">审核</span>
                <span class="sub" id="show" style="display: none">审核中....</span>
            </empty>
            </empty>
        </form>
    </div>
    </block>
<block name="CSS">
    <link rel="stylesheet" href="{:C('__STATIC__')}{$theme}/Static/{:C('css')}/khxq.css" />
</block>
<block name="JS">
    <script type="text/javascript">
        $(function(){
            $("#sub").click(function(){
                var remark = $("#remark").val();
                if(!remark){
                    layer.alert("备注必填");
                    return false;
                }
                layer.confirm('您确认进行此操作吗？', {
                    btn: ['确认', '取消']
                }, function () {
                    $("#sub").hide();
                    $("#show").show();
                    $("#mem_save").submit();
                });
            });
        });
    </script>
</block>